package com.demo.mySpring;

import com.demo.mySpring.Dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description:
 * @Author: fan
 * @Data: 2021/7/24 17:15
 * @Version: 1.0v
 */
public class Demo {
	public static void main(String[] args) throws ClassNotFoundException {
		ApplicationContext ac = new AnnotationConfigApplicationContext(Config.class);
		ClassPathXmlApplicationContext classPathXmlApplicationContext =
				new ClassPathXmlApplicationContext("classpath:factorybean/demo/springtest.xml");
//
		ApplicationContext context = new ClassPathXmlApplicationContext("application_context.xml");
//
//		System.out.println(ac.getBean(Test.class));
//		System.out.println(ac.getBean(UserDao.class));
//		System.out.println(ac.getBean("userDao"));

//		Class<?> startupClass = ClassLoader.loadClass("org.apache.catalina.startup.Catalina");
		//Object startupInstance = startupClass.getConstructor().newInstance();




	}
}
